<nz-spin *ngIf="isLoading" class="modal-spin"></nz-spin>
<form nz-form *ngIf="!isLoading" [formGroup]="validateForm" (ngSubmit)="submitForm()">
  <nz-form-item>
    <nz-form-label [nzSpan]="6" nzRequired nzFor="name">意向用户名称</nz-form-label>
    <nz-form-control [nzSpan]="18" [nzValidateStatus]="validateForm.controls['name']">
      <input type="text" nz-input formControlName="name" placeholder="名称" readonly>
      <nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').hasError('required')">请输入名称</nz-form-explain>
      <nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').hasError('maxlength')">不能超过30个字</nz-form-explain>
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSpan]="6" nzRequired nzFor="salesmanId">星创股东</nz-form-label>
    <nz-form-control [nzSpan]="18" [nzValidateStatus]="validateForm.controls['salesmanId']">
      <nz-select formControlName="salesmanId" [nzPlaceHolder]="'配置星创股东'">
        <nz-option
          *ngFor="let option of allSalesman"
          [nzLabel]="option.name"
          [nzValue]="option.id">
        </nz-option>
      </nz-select>
      <nz-form-explain *ngIf="validateForm.get('salesmanId').dirty && validateForm.get('salesmanId').hasError('required')">请选择星创股东</nz-form-explain>
    </nz-form-control>
  </nz-form-item>
  <div class="modal-footer">
    <button nz-button type="button" (click)="close()">关闭</button>
    <button nz-button type="submit" [nzType]="'primary'" >保存</button>
  </div>
</form>
